# Replication Archive

**Paper:** "Two dilemmas in the politics of ethnic federalism: Experimental evidence from Ethiopia"


## Overview

This archive reproduces all figures and tables from the paper using a single Quarto document (`replication.qmd`). All data, code, and outputs are self-contained in this folder.

## Requirements

- [R](https://cran.r-project.org/) (version 4.0+)
- [Quarto](https://quarto.org/) (version 1.4+)
- The following R packages:

```r
install.packages(c(
  "tidyverse", "cregg", "stargazer", "haven", "ggeffects",
  "pwr", "MetBrewer", "ggrepel", "patchwork", "ggbump",
  "ggbeeswarm", "readxl", "scales", "broom", "stringi", "janitor"
))
```

## How to Reproduce

From the `replication/` directory, run:

```bash
quarto render replication.qmd
```

This produces `replication.html`, a self-contained HTML file with all figures and tables rendered inline. It also exports publication-quality figures (PDF and PNG at 700 DPI) and LaTeX tables to the `figures/` subdirectory.

## Contents

```
replication/
├── README.md                 This file
├── replication.qmd           Quarto source (all analysis code)
├── replication.html          Rendered output
├── codebook.csv              Variable documentation (55 variables)
├── data/
│   ├── clean_baseline.rds          Baseline survey (1,184 respondents, 16 variables)
│   ├── clean-decent-conjoint.rds   Conjoint experiment (4,216 observations, 11 variables)
│   ├── afrobarometer.sav           Afrobarometer Ethiopia Round 8 (2,378 respondents, 19 variables)
│   ├── EPR-2023.csv                Ethnic Power Relations, Ethiopia subset (49 rows, 5 variables)
│   └── ethphcensusatlas_data.xls   2007 census woreda-level demographics
└── figures/                  Generated outputs (18 PDF/PNG pairs + 8 LaTeX tables)
```

## Outputs

### Main Text

| Figure | Description |
|--------|-------------|
| Figure 1 | Ethnic power relations bump chart and woreda demographics |
| Figure 2 | Treatment effects on federalism support |
| Figure 3 | Heterogeneous effects by one-party rule support (A) and ethnic tolerance (B) |
| Figure 4 | Conjoint marginal means |
| Figure 5 | Conjoint marginal means by ethnic violence support |
| Table 1 | Conjoint design attributes (static) |

### Appendix

| Output | Description |
|--------|-------------|
| Figures A1--A6 | Population comparisons (Afrobarometer vs. study sample) |
| Figure A7 | Conjoint marginal means by public sector plans |
| Table A1 | Post-hoc power analysis |
| Table A2 | Conjoint marginal means with p-values |
| Figure A8 | Conjoint AMCEs by ethnicity |
| Tables A3--A6 | Vignette regression tables (main, co-ethnic president, one-party rule, tolerance) |
| Figures A9--A10 | Overall AMCEs and AMCE differences by border type |
| Table A7 | Difference in marginal means by ethnic violence support |
| Table A8 | Marginal means by ethnic group |
| Figures A11--A13 | Balance tests (attribute frequencies, multi-ethnic balance, carryover) |

## Data

All datasets have been stripped to only the variables used in the analysis. No personally identifiable information is included. The only respondent identifier (`r_id`) uses anonymous sequential IDs. See `codebook.csv` for variable descriptions.
